package com.hsh.gaoqianlianmeng.comparator;

import com.hsh.gaoqianlianmeng.domain.PDDImport;

public class ShopImportComparator {

    /**
     * 按商品编码序号排序，序号相同时按商品编码排序
     *
     * @param s1
     * @param s2
     * @return
     */
    public static int compare(PDDImport s1, PDDImport s2) {

        // 序号相同，按商品编码排序
        String expressCompany1 = s1.getExpressCompany();
        String expressCompany2 = s2.getExpressCompany();

        if (expressCompany1 == null) {
            s1.setExpressCompany("");
        }
        if (expressCompany2 == null) {
            s2.setExpressCompany("");
        }
        return expressCompany1.compareTo(expressCompany2);


    }


}
